﻿@model IEnumerable<Model.Student>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table class="table">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.StrName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.sex)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Grade_id)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Hobbies)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Photo)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Remark)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Married)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.StrName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.sex)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Grade_id)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Hobbies)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Photo)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Remark)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Married)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.id }) |
            @Html.ActionLink("Details", "Details", new { id=item.id }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.id })
        </td>
    </tr>
}

</table>
